package homework;

import org.apache.hadoop.io.LongWritable;
import org.apache.hadoop.io.NullWritable;
import org.apache.hadoop.io.Text;
import org.apache.hadoop.mapreduce.Mapper;

import java.io.IOException;

public class HomeWorkMapper extends Mapper<Object, Text, LongWritable, NullWritable> {
    private final LongWritable longWritable = new LongWritable();
    @Override
    protected void map(Object key, Text value, Context context) throws IOException, InterruptedException {
        longWritable.set(Long.parseLong(value.toString()));
        context.write(longWritable, NullWritable.get());
    }
}
